<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
    <script src="../js/jq-1.12.4.js"></script>
    <script src="../js/bootstrap.js"></script>
</head>

<body>
    <button class="btn btn-primary" data-toggle="modal" id="show-btn"> 点击显示模态框</button>
    <div id="app" class="modal fade">
        <!-- 对话框 -->
        <div class="modal-dialog">
            <!-- 内容 -->
            <div class="modal-content">
                <!-- 头部 -->
                <div class="modal-header">
                    <!-- 关闭按钮 -->
                    <button class="close " data-dismiss="modal">&times;</button>
                    <!-- 标题 -->
                    <div class="modal-title">标题</div>

                </div>
                <!-- 主体 -->
                <div class="media-body">
                    页面主体部分
                </div>
                <!-- 页脚 -->
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal">取消</button>
                    <button class="btn btn-default" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    $(function () {
        $('#show-btn').click(function () {
            $('.modal').modal()
        })
    })
</script>

</html>